<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增更新操作')" />
    <th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-forceReplace-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">项目类型：</label>
                <div class="col-sm-8">
                    <select name="projectType" class="form-control m-b">
                        <option value="0">服务商</option>
                        <option value="3">商户</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">系统类型：</label>
                <div class="col-sm-8">
                    <select name="sysmark" class="form-control m-b">
                        <option value="1" name="sysmark">android</option>
                        <option value="2" name="sysmark">ios</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">下载地址：</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">是否强制：</label>
                <div class="col-sm-8">
                    <select name="force" class="form-control m-b">
                        <option value="1" name="force">是</option>
                        <option value="2" name="force">否</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">版本号：</label>
                <div class="col-sm-8">
                    <input name="version" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">市场类型：</label>
                <div class="col-sm-8">
                    <input name="channel" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">更新内容：</label>
                <div class="col-sm-8" >
                    <textarea rows="10" cols="10"  name="content"  class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script th:inline="javascript">
        var prefix = ctx + "forceReplace/forceReplace"
        $("#form-forceReplace-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-forceReplace-add').serialize());
            }
        }


        $(document).ready(function () {
            $('.summernote').summernote({
                lang: 'zh-CN'
            });
        });
        var edit = function () {
            $("#eg").addClass("no-padding");
            $('.click2edit').summernote({
                lang: 'zh-CN',
                focus: true
            });
        };
        var save = function () {
            $("#eg").removeClass("no-padding");
            var aHTML = $('.click2edit').summernote('code');
            $('.click2edit').summernote('destroy');
        };
    </script>
</body>
</html>